package protobuf {
	import com.netease.protobuf.*;
	use namespace com.netease.protobuf.used_by_generated_code;
	import com.netease.protobuf.fieldDescriptors.*;
	import flash.utils.Endian;
	import flash.utils.IDataInput;
	import flash.utils.IDataOutput;
	import flash.utils.IExternalizable;
	import flash.errors.IOError;
	import protobuf.E_BEHAVIOR_RECORD;
	import flash.utils.ByteArray;
	// @@protoc_insertion_point(imports)

	// @@protoc_insertion_point(class_metadata)
	public dynamic final class MATCH_RECORD_ITEM extends com.netease.protobuf.Message {
		/**
		 *  @private
		 */
		public static const CHAIR_ID:FieldDescriptor$TYPE_INT32 = new FieldDescriptor$TYPE_INT32("protobuf.MATCH_RECORD_ITEM.chair_id", "chairId", (1 << 3) | com.netease.protobuf.WireType.VARINT);

		private var chair_id$field:int;

		private var hasField$0:uint = 0;

		public function clearChairId():void {
			hasField$0 &= 0xfffffffe;
			chair_id$field = new int();
		}

		public function get hasChairId():Boolean {
			return (hasField$0 & 0x1) != 0;
		}

		public function set chairId(value:int):void {
			hasField$0 |= 0x1;
			chair_id$field = value;
		}

		public function get chairId():int {
			return chair_id$field;
		}

		/**
		 *  @private
		 */
		public static const BEHAVIOR:FieldDescriptor$TYPE_ENUM = new FieldDescriptor$TYPE_ENUM("protobuf.MATCH_RECORD_ITEM.behavior", "behavior", (2 << 3) | com.netease.protobuf.WireType.VARINT, protobuf.E_BEHAVIOR_RECORD);

		public var behavior:int;

		/**
		 *  @private
		 */
		public static const INT_PARAM:FieldDescriptor$TYPE_INT32 = new FieldDescriptor$TYPE_INT32("protobuf.MATCH_RECORD_ITEM.int_param", "intParam", (3 << 3) | com.netease.protobuf.WireType.VARINT);

		private var int_param$field:int;

		public function clearIntParam():void {
			hasField$0 &= 0xfffffffd;
			int_param$field = new int();
		}

		public function get hasIntParam():Boolean {
			return (hasField$0 & 0x2) != 0;
		}

		public function set intParam(value:int):void {
			hasField$0 |= 0x2;
			int_param$field = value;
		}

		public function get intParam():int {
			return int_param$field;
		}

		/**
		 *  @private
		 */
		public static const DOUBLE_PARAM:FieldDescriptor$TYPE_DOUBLE = new FieldDescriptor$TYPE_DOUBLE("protobuf.MATCH_RECORD_ITEM.double_param", "doubleParam", (4 << 3) | com.netease.protobuf.WireType.FIXED_64_BIT);

		private var double_param$field:Number;

		public function clearDoubleParam():void {
			hasField$0 &= 0xfffffffb;
			double_param$field = new Number();
		}

		public function get hasDoubleParam():Boolean {
			return (hasField$0 & 0x4) != 0;
		}

		public function set doubleParam(value:Number):void {
			hasField$0 |= 0x4;
			double_param$field = value;
		}

		public function get doubleParam():Number {
			return double_param$field;
		}

		/**
		 *  @private
		 */
		public static const STR_PARAM:FieldDescriptor$TYPE_BYTES = new FieldDescriptor$TYPE_BYTES("protobuf.MATCH_RECORD_ITEM.str_param", "strParam", (5 << 3) | com.netease.protobuf.WireType.LENGTH_DELIMITED);

		private var str_param$field:flash.utils.ByteArray;

		public function clearStrParam():void {
			str_param$field = null;
		}

		public function get hasStrParam():Boolean {
			return str_param$field != null;
		}

		public function set strParam(value:flash.utils.ByteArray):void {
			str_param$field = value;
		}

		public function get strParam():flash.utils.ByteArray {
			return str_param$field;
		}

		/**
		 *  @private
		 */
		public static const VECTOR_INT_PARAM:RepeatedFieldDescriptor$TYPE_INT32 = new RepeatedFieldDescriptor$TYPE_INT32("protobuf.MATCH_RECORD_ITEM.vector_int_param", "vectorIntParam", (6 << 3) | com.netease.protobuf.WireType.VARINT);

		[ArrayElementType("int")]
		public var vectorIntParam:Array = [];

		/**
		 *  @private
		 */
		public static const TIME:FieldDescriptor$TYPE_UINT64 = new FieldDescriptor$TYPE_UINT64("protobuf.MATCH_RECORD_ITEM.time", "time", (7 << 3) | com.netease.protobuf.WireType.VARINT);

		public var time:UInt64;

		/**
		 *  @private
		 */
		override used_by_generated_code final function writeToBuffer(output:com.netease.protobuf.WritingBuffer):void {
			if (hasChairId) {
				com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.VARINT, 1);
				com.netease.protobuf.WriteUtils.write$TYPE_INT32(output, chair_id$field);
			}
			com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.VARINT, 2);
			com.netease.protobuf.WriteUtils.write$TYPE_ENUM(output, this.behavior);
			if (hasIntParam) {
				com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.VARINT, 3);
				com.netease.protobuf.WriteUtils.write$TYPE_INT32(output, int_param$field);
			}
			if (hasDoubleParam) {
				com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.FIXED_64_BIT, 4);
				com.netease.protobuf.WriteUtils.write$TYPE_DOUBLE(output, double_param$field);
			}
			if (hasStrParam) {
				com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.LENGTH_DELIMITED, 5);
				com.netease.protobuf.WriteUtils.write$TYPE_BYTES(output, str_param$field);
			}
			for (var vectorIntParam$index:uint = 0; vectorIntParam$index < this.vectorIntParam.length; ++vectorIntParam$index) {
				com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.VARINT, 6);
				com.netease.protobuf.WriteUtils.write$TYPE_INT32(output, this.vectorIntParam[vectorIntParam$index]);
			}
			com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.VARINT, 7);
			com.netease.protobuf.WriteUtils.write$TYPE_UINT64(output, this.time);
			for (var fieldKey:* in this) {
				super.writeUnknown(output, fieldKey);
			}
		}

		/**
		 *  @private
		 */
		override used_by_generated_code final function readFromSlice(input:flash.utils.IDataInput, bytesAfterSlice:uint):void {
			var chair_id$count:uint = 0;
			var behavior$count:uint = 0;
			var int_param$count:uint = 0;
			var double_param$count:uint = 0;
			var str_param$count:uint = 0;
			var time$count:uint = 0;
			while (input.bytesAvailable > bytesAfterSlice) {
				var tag:uint = com.netease.protobuf.ReadUtils.read$TYPE_UINT32(input);
				switch (tag >> 3) {
				case 1:
					if (chair_id$count != 0) {
						throw new flash.errors.IOError('Bad data format: MATCH_RECORD_ITEM.chairId cannot be set twice.');
					}
					++chair_id$count;
					this.chairId = com.netease.protobuf.ReadUtils.read$TYPE_INT32(input);
					break;
				case 2:
					if (behavior$count != 0) {
						throw new flash.errors.IOError('Bad data format: MATCH_RECORD_ITEM.behavior cannot be set twice.');
					}
					++behavior$count;
					this.behavior = com.netease.protobuf.ReadUtils.read$TYPE_ENUM(input);
					break;
				case 3:
					if (int_param$count != 0) {
						throw new flash.errors.IOError('Bad data format: MATCH_RECORD_ITEM.intParam cannot be set twice.');
					}
					++int_param$count;
					this.intParam = com.netease.protobuf.ReadUtils.read$TYPE_INT32(input);
					break;
				case 4:
					if (double_param$count != 0) {
						throw new flash.errors.IOError('Bad data format: MATCH_RECORD_ITEM.doubleParam cannot be set twice.');
					}
					++double_param$count;
					this.doubleParam = com.netease.protobuf.ReadUtils.read$TYPE_DOUBLE(input);
					break;
				case 5:
					if (str_param$count != 0) {
						throw new flash.errors.IOError('Bad data format: MATCH_RECORD_ITEM.strParam cannot be set twice.');
					}
					++str_param$count;
					this.strParam = com.netease.protobuf.ReadUtils.read$TYPE_BYTES(input);
					break;
				case 6:
					if ((tag & 7) == com.netease.protobuf.WireType.LENGTH_DELIMITED) {
						com.netease.protobuf.ReadUtils.readPackedRepeated(input, com.netease.protobuf.ReadUtils.read$TYPE_INT32, this.vectorIntParam);
						break;
					}
					this.vectorIntParam.push(com.netease.protobuf.ReadUtils.read$TYPE_INT32(input));
					break;
				case 7:
					if (time$count != 0) {
						throw new flash.errors.IOError('Bad data format: MATCH_RECORD_ITEM.time cannot be set twice.');
					}
					++time$count;
					this.time = com.netease.protobuf.ReadUtils.read$TYPE_UINT64(input);
					break;
				default:
					super.readUnknown(input, tag);
					break;
				}
			}
		}

	}
}
